#include "arc.hpp"


Arc* initArc (int valeur, bool verbose) {

    Arc *a = (Arc*) malloc (sizeof(Arc));

    a->valeur = valeur;

    a->src = NULL;
    a->dst = NULL;

    return a;
}

Arc* initArc(Noeud* src, Noeud* dst, int valeur, bool verbose) {

    Arc *a = (Arc*) malloc (sizeof(Arc));

    a->valeur = valeur;

    a->src = src;
    a->dst = dst;

    return a;
}

void affichageArc (Arc *a) {
    cout << "\t" << a->src->nom << " -> " << a->dst->nom << " : " << a->valeur << endl;
}

void affichageArcExt (Arc *a) {
    cout << "\t" << a->dst->nom << " : " <<  a->valeur << endl;
}

void affichageArcInt (Arc *a) {
    cout << "\t"  << a->src->nom << " : " <<  a->valeur << endl;
}

void testamentArc (Arc *a) {

    a->dst = NULL;
    a->src = NULL;

    free(a);

}
